#pragma once
#include "EnemyUnit.h"
#include "../SGD Wrappers/SGD_Listener.h"
//#include "../SGD Wrappers/SGD_Handle.h"
class SpawnDoor;


class GuardDog : public EnemyUnit, public SGD::Listener
{
public:
	GuardDog();
	~GuardDog();

	virtual void Update(float dt)	 override;
	//virtual void Render()			 override;
	virtual void HandleEvent(const SGD::Event* pEvent);
	virtual void HandleCollision(const IBase* pOther) override;

//	virtual SGD::Rectangle	GetRect(void)	const;

	virtual int GetType(void) const override { return OBJ_DOG; }


	void RetrieveBehavior(std::string name);
	virtual void Attack() override;
	void SetOwner(SpawnDoor* owner);

	SpawnDoor* GetOwner() const { return m_pOwner; }

private:

	float m_fAttackRange = 0.0f;
	BaseBehavior* currBehavior = nullptr;
	SpawnDoor* m_pOwner = nullptr;
	SGD::Point m_ptLastKnownPos = { 0, 0 };
	SGD::HAudio* barking = nullptr;
	SGD::HAudio* sniffing = nullptr;
	SGD::HVoice voice = SGD::INVALID_HANDLE;

	friend class BaseBehavior;

};

